/*
 * @Description: 返回头
 * @Author: ZzT
 * @Date: 2023-03-03 14:41:02
 * @LastEditTime: 2023-03-10 16:40:39
 */
import { Button } from 'antd';
import classNames from 'classnames/bind';
import { useNavigate } from 'react-router-dom';
import { LeftOutlined } from '@ant-design/icons';
import styles from '../styles/searchResult.module.scss';

const cx = classNames.bind(styles);
const ResultHeader = (props: any) => {
  const { type } = props;
  const navigate = useNavigate();

  return (
    <div className={cx('search-header')}>
      <Button type="text" onClick={() => navigate(-1)}>
        <LeftOutlined />
        返回
      </Button>
      <div className={cx('head-title')}>
        <b>{type === 4 ? '图片检索' : '音视频检索'}</b>
      </div>
    </div>
  );
};
export default ResultHeader;
